package com.isoft.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 航班基础信息表-存储航班核心标识信息
 * @TableName FLIGHT_BASE
 */
@TableName(value ="FLIGHT_BASE")
@Data
public class FlightBase implements Serializable {
    /**
     * 系统内部航班ID
     */
    @TableId
    private Long FLIGHT_ID;

    /**
     * 关联航班ID(用于虚拟航班)
     */
    private Long AFID;

    /**
     * 航班标识(旧格式:航司-航班号-执行日期-进出标志)
     */
    private String FFID;

    /**
     * 航班标识(新格式:航司-航班号-计划时间-进出标志)
     */
    private String FIDE;

    /**
     * 航空公司二字码
     */
    private String AWCD;

    /**
     * 航班号(1-8位字符)
     */
    private String FLNO;

    /**
     * 航班执行日期(yyyyMMdd)
     */
    private Date FEXD;

    /**
     * 航班所属计划批次标识日期
     */
    private Date FIMD;

    /**
     * 进出标志:A=进港/D=出港
     */
    private String FLIO;

    /**
     * 航班任务类型(W=正班/Z=加班等)
     */
    private String FLTK;

    /**
     * 航班属性:2401=国际/2402=地区/2403=国内/2404=混合
     */
    private String FAIT;

    /**
     * 航班属性变更前的旧值
     */
    private String PATT;

    /**
     * 主航班唯一编号(虚拟附属航班使用)
     */
    private Long MFID;

    /**
     * 主航班标识(旧格式)
     */
    private String MFFI;

    /**
     * 主航班标识(新格式)
     */
    private String MFIE;

    /**
     * 起降架次
     */
    private Integer CONT;

    /**
     * 航班代理信息
     */
    private String PROX;

    /**
     * 机型ICAO代码
     */
    private String CFTP;

    /**
     * 机号(1-15位字符)
     */
    private String CFNO;

    /**
     * 国内航站楼编号
     */
    private String NMCD;

    /**
     * 国际航站楼编号
     */
    private String JMCD;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FlightBase other = (FlightBase) that;
        return (this.getFLIGHT_ID() == null ? other.getFLIGHT_ID() == null : this.getFLIGHT_ID().equals(other.getFLIGHT_ID()))
                && (this.getAFID() == null ? other.getAFID() == null : this.getAFID().equals(other.getAFID()))
                && (this.getFFID() == null ? other.getFFID() == null : this.getFFID().equals(other.getFFID()))
                && (this.getFIDE() == null ? other.getFIDE() == null : this.getFIDE().equals(other.getFIDE()))
                && (this.getAWCD() == null ? other.getAWCD() == null : this.getAWCD().equals(other.getAWCD()))
                && (this.getFLNO() == null ? other.getFLNO() == null : this.getFLNO().equals(other.getFLNO()))
                && (this.getFEXD() == null ? other.getFEXD() == null : this.getFEXD().equals(other.getFEXD()))
                && (this.getFIMD() == null ? other.getFIMD() == null : this.getFIMD().equals(other.getFIMD()))
                && (this.getFLIO() == null ? other.getFLIO() == null : this.getFLIO().equals(other.getFLIO()))
                && (this.getFLTK() == null ? other.getFLTK() == null : this.getFLTK().equals(other.getFLTK()))
                && (this.getFAIT() == null ? other.getFAIT() == null : this.getFAIT().equals(other.getFAIT()))
                && (this.getPATT() == null ? other.getPATT() == null : this.getPATT().equals(other.getPATT()))
                && (this.getMFID() == null ? other.getMFID() == null : this.getMFID().equals(other.getMFID()))
                && (this.getMFFI() == null ? other.getMFFI() == null : this.getMFFI().equals(other.getMFFI()))
                && (this.getMFIE() == null ? other.getMFIE() == null : this.getMFIE().equals(other.getMFIE()))
                && (this.getCONT() == null ? other.getCONT() == null : this.getCONT().equals(other.getCONT()))
                && (this.getPROX() == null ? other.getPROX() == null : this.getPROX().equals(other.getPROX()))
                && (this.getCFTP() == null ? other.getCFTP() == null : this.getCFTP().equals(other.getCFTP()))
                && (this.getCFNO() == null ? other.getCFNO() == null : this.getCFNO().equals(other.getCFNO()))
                && (this.getNMCD() == null ? other.getNMCD() == null : this.getNMCD().equals(other.getNMCD()))
                && (this.getJMCD() == null ? other.getJMCD() == null : this.getJMCD().equals(other.getJMCD()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFLIGHT_ID() == null) ? 0 : getFLIGHT_ID().hashCode());
        result = prime * result + ((getAFID() == null) ? 0 : getAFID().hashCode());
        result = prime * result + ((getFFID() == null) ? 0 : getFFID().hashCode());
        result = prime * result + ((getFIDE() == null) ? 0 : getFIDE().hashCode());
        result = prime * result + ((getAWCD() == null) ? 0 : getAWCD().hashCode());
        result = prime * result + ((getFLNO() == null) ? 0 : getFLNO().hashCode());
        result = prime * result + ((getFEXD() == null) ? 0 : getFEXD().hashCode());
        result = prime * result + ((getFIMD() == null) ? 0 : getFIMD().hashCode());
        result = prime * result + ((getFLIO() == null) ? 0 : getFLIO().hashCode());
        result = prime * result + ((getFLTK() == null) ? 0 : getFLTK().hashCode());
        result = prime * result + ((getFAIT() == null) ? 0 : getFAIT().hashCode());
        result = prime * result + ((getPATT() == null) ? 0 : getPATT().hashCode());
        result = prime * result + ((getMFID() == null) ? 0 : getMFID().hashCode());
        result = prime * result + ((getMFFI() == null) ? 0 : getMFFI().hashCode());
        result = prime * result + ((getMFIE() == null) ? 0 : getMFIE().hashCode());
        result = prime * result + ((getCONT() == null) ? 0 : getCONT().hashCode());
        result = prime * result + ((getPROX() == null) ? 0 : getPROX().hashCode());
        result = prime * result + ((getCFTP() == null) ? 0 : getCFTP().hashCode());
        result = prime * result + ((getCFNO() == null) ? 0 : getCFNO().hashCode());
        result = prime * result + ((getNMCD() == null) ? 0 : getNMCD().hashCode());
        result = prime * result + ((getJMCD() == null) ? 0 : getJMCD().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", FLIGHT_ID=").append(FLIGHT_ID);
        sb.append(", AFID=").append(AFID);
        sb.append(", FFID=").append(FFID);
        sb.append(", FIDE=").append(FIDE);
        sb.append(", AWCD=").append(AWCD);
        sb.append(", FLNO=").append(FLNO);
        sb.append(", FEXD=").append(FEXD);
        sb.append(", FIMD=").append(FIMD);
        sb.append(", FLIO=").append(FLIO);
        sb.append(", FLTK=").append(FLTK);
        sb.append(", FAIT=").append(FAIT);
        sb.append(", PATT=").append(PATT);
        sb.append(", MFID=").append(MFID);
        sb.append(", MFFI=").append(MFFI);
        sb.append(", MFIE=").append(MFIE);
        sb.append(", CONT=").append(CONT);
        sb.append(", PROX=").append(PROX);
        sb.append(", CFTP=").append(CFTP);
        sb.append(", CFNO=").append(CFNO);
        sb.append(", NMCD=").append(NMCD);
        sb.append(", JMCD=").append(JMCD);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}